import fetch from '@/utils/fetch'
import { removeDateTime } from "@/filters";

export function created(data) {
    return fetch({
        url: '/api/upms/app/add',
        method: 'post',
        data
    })
}

export function deleted(id) {
    return fetch({
        url: '/api/upms/app/delete/'+id,
        method: 'get'
    })
}

export function updated(data) {
    data = removeDateTime(data)
    return fetch({
        url: '/api/upms/app/update',
        method: 'post',
        data
    })
}

export function fetchObject(id) {
    return fetch({
        url: '/api/upms/app/get/'+id
    })
}

export function fetchList(query) {
    return fetch({
        url: '/api/upms/app/list',
        method: 'get',
        params: query
    })
}


export function fetchListApp(query) {
    return fetch({
        url: '/api/upms/app/list',
        method: 'get',
        params: query
    })
}
